package com.wwl.cms.utils.designModeTest.observer.improve;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/9/13 19:56
 * @description:
 */
public class BaiduSite implements Observer {
    private float temperature;
    private float pressure;
    private float humidity;

    @Override
    public void update(float temperature, float pressure, float humidity) {
        this.temperature = temperature;
        this.pressure = pressure;
        this.humidity = humidity;
        display();
    }
    public void display(){
        System.out.println("***Today temperature:"+temperature+"***");
        System.out.println("***Today pressure:"+pressure+"***");
        System.out.println("***Today humidity:"+humidity+"***");
    }
}
